home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / prodpack.zip / DB4PPSRC.EXE / _DLENTRY.PRG < prev    next >
Text File  |  1993-05-04  |  3KB  |  106 lines

  1. PROCEDURE _DLEntry
  2. PARAMETERS pc_panel, pc_file
  3. *---------------------------------------------------------------------
  4. * NAME
  5. *   _DLEntry - Control Center Entry program for the Forms panel
  6. *
  7. * DESCRIPTION
  8. *   This program replaces the activity that the dBASE IV control
  9. *   center would do if the Form Entry hook did not exist.  It handles
  10. *   forms with and without lookups, detail files, and/or help.
  11. *
  12. * SYNOPSIS
  13. *   From DOT prompt, DEBUG _DLEntry WITH <pc_panel>, <pc_file>
  14. *   From Config.db,  PRGFORM = _DLEntry,...
  15. *
  16. * PARAMETERS
  17. *   pc_panel  = panel name, "FORM"
  18. *   pc_file   = name of scr file: blank if new,
  19. *               or full SCR file name
  20. *
  21. * LIMITATIONS
  22. *
  23. * DEPENDENCIES
  24. *
  25. *   Creates the following public memory variables:
  26. *     FXN_TYPE    = Typeahead buffer value when entering surface.  Reset
  27. *                   back by _DLExit
  28. *     FXL_CLOCK   = Clock status when first entering the surface
  29. *     FXL_ESCAPE  = Escape status when first entering the surface
  30. *     FXL_STATUS  = Status bar state when first entering the surface
  31. *
  32. * VARIABLES
  33. *   ll_talk     = State of TALK,   .T. if on, .F. if off
  34. *   ll_dbtrap   = State of DBTRAP, .T. if on, .F. if off
  35. *   ll_status   = State of STATUS, .T. if on, .F. if off
  36. *   ll_clock    = State of CLOCK,  .T. if on, .F. if off
  37. *   ll_exact    = State of EXACT,  .T. if on, .F. if off
  38. *   ll_near     = State of NEAR,   .T. if on, .F. if off
  39. *   ll_fields   = State of FIELDS, .T. if on, .F. if off
  40. *   lc_scbname  = Name of SCB file derived from SCR file name
  41. *   ll_isscb    = If the SCB file exists, set to .T., else .F.
  42. *   ll_loaded   = If the correct DBF or view was opened, .T., else .F.
  43. *
  44. *---------------------------------------------------------------------
  45.   SET ECHO OFF
  46.   PRIVATE ll_talk, ll_dbtrap, ll_status, ll_clock, ll_exact, ;
  47.           ll_near, ll_fields, lc_scbname, ll_isscb, ll_loaded, lc_view, ;
  48.           ln_mem
  49.  
  50.   ll_talk = _TalkMode( .F. )          && Shut talk off and save state
  51.   SET FORMAT TO 
  52.  
  53.  
  54.   IF TYPE( "FXL_ESCAPE" ) = "U"
  55.     PUBLIC FXL_Escape
  56.     FXL_Escape = SET( "ESCAPE" ) = "ON" && Save the ESCAPE state
  57.     #ifdef SFX_debug
  58.       SET ESCAPE ON
  59.     #else
  60.       SET ESCAPE OFF                    && Force ESCAPE OFF so prgs can't be stopped
  61.     #endif
  62.   ENDIF
  63.  
  64.   IF TYPE( "FXL_CLOCK" ) = "U"
  65.     PUBLIC FXL_Clock
  66.     FXL_Clock = SET( "CLOCK" ) = "ON"   && Save clock state
  67.     SET CLOCK OFF                       && FOrce it off for other DSP's
  68.   ENDIF
  69.  
  70.   IF TYPE( "FXL_Status" ) = "U"
  71.     PUBLIC FXL_Status
  72.     FXL_Status = SET( "Status" ) = "ON" && Save Status state
  73.   ENDIF
  74.  
  75.   RELEASE FXL_DBTrap
  76.   PUBLIC FXL_DBTrap
  77.   FXL_DBTrap = SET( "DBTRAP" ) = "ON"
  78.   SET DBTRAP OFF
  79.  
  80.  
  81.  
  82.   RELEASE FXN_type
  83.   PUBLIC FXN_type
  84.   FXN_type = SET( "TYPEAHEAD" )
  85.   SET TYPEAHEAD TO 4000
  86.   USE IN 1
  87.   CLOSE DATABASE
  88.  
  89.   IF _TalkMode( ll_talk )
  90.   ENDIF
  91.  
  92.   ON ERROR
  93.  
  94.   IF ISBLANK( pc_file )
  95.     CLEAR TYPEAHEAD
  96.     KEYBOARD [{DnArrow}{DnArrow}{DnArrow}]
  97.     KEYBOARD CHR(27)                    && Escape from the Layout menu
  98.   ENDIF
  99.  
  100. RETURN
  101. *-- EOP: _DLEntry WITH pc_panel, pc_file
  102.  
  103.  
  104.  
  105.  
  106.